/*
 * Copyright (C) 2007-2015 FBReader.ORG Limited <contact@fbreader.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301, USA.
 */

package org.geometerplus.zlibrary.core.view;

/**
 * zlView枚举
 */
public interface ZLViewEnums {
    /**
     * 页面坐标 上一页、当前页、下一页
     */
    public static enum PageIndex {
        previous, current, next;

        /**
         * 获取下一页，当前是上一下返回下一页，当前是当前页返回下一页
         *
         * @return
         */
        public PageIndex getNext() {
            switch (this) {
                case previous:
                    return current;
                case current:
                    return next;
                default:
                    return null;
            }
        }

        /**
         * 返回上一页，当前上下一页返回当前页，当前是当前页返回上一页
         *
         * @return
         */
        public PageIndex getPrevious() {
            switch (this) {
                case next:
                    return current;
                case current:
                    return previous;
                default:
                    return null;
            }
        }
    }

    /**
     * 方向枚举
     */
    public static enum Direction {

        leftToRight(true), rightToLeft(true), up(false), down(false);

        public final boolean IsHorizontal;

        Direction(boolean isHorizontal) {
            IsHorizontal = isHorizontal;
        }
    }

    /**
     * 动画类型
     */
    public static enum Animation {
        //无、卷曲、滑动、移动、垂直、自动重叠、自动滚动
        none, curl, slide, shift, vertical, autoread_overlap, autoread_scroll
    }
}
